import org.hibernate.Session;

import com.pys.utils.HibernateUtil;

public class Transaction {

	public Transaction(Class cls, String metod) {
	}

	public Object execute() {
		Session session = null;
		Object object = null;
		try {
			session = HibernateUtil.getSessionFactory().openSession();
			session.beginTransaction();

			Class cls = Class.forName("");

			session.getTransaction().commit();
		} catch (Exception e) {
			if (session != null) {
				session.getTransaction().rollback();
			}
		} finally {
			if (session != null) {
				session.close();
			}
		}
		return object;
	}
}
